//
//  RootViewController.h
//  VMIX
//
//  Created by jeffs on 5/14/10.
//  Copyright VMIX Media Inc. 2010. All rights reserved.
//

#import <UIKit/UIKit.h>

@class DetailViewController;
@class GetCollectionMediasOperation;
@class GetCollectionsOperation;
@class VmixVideo;
@class VmixCollection;
@class VideoCell;
@class CollectionsPopOver;
@class VmixGridViewController;

@interface RootViewController : UITableViewController <GetCollectionMediasOperationDelegate, GetCollectionsOperationDelegate> {
    
    DetailViewController *detailViewController;
	
	NSMutableArray *mediasList;
	NSMutableArray *collectionsList;
	NSOperationQueue *oppQueue;
	GetCollectionMediasOperation *getCollectionMediasOperation;
	GetCollectionsOperation *getCollectionsOperation;
	VmixVideo *video;
	VmixCollection *collection;
	
	IBOutlet VideoCell *videoCell;
	NSMutableData  *authData;
	
	UIPopoverController * collectionsPopOver;
	CollectionsPopOver * collectionsPopOverView;
	UIButton *collectionsButton;
	NSMutableDictionary *imageCache;
	
	UIBarButtonItem *rightArrowButton;
	UIBarButtonItem *leftArrowButton;
	
	VmixGridViewController * gridViewController;
	Boolean appLaunched;

    // Boolean value to allow shutting down of the spinner
    Boolean viewContainsNoContent;

}

@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController;
@property(nonatomic, retain) NSMutableArray *mediasList;
@property(nonatomic, retain) NSMutableArray *collectionsList;
@property(nonatomic, retain) NSOperationQueue *oppQueue;
@property(nonatomic, retain) GetCollectionMediasOperation *getCollectionMediasOperation;
@property(nonatomic, retain) GetCollectionsOperation *getCollectionsOperation;
@property(nonatomic, retain) VmixVideo *video;
@property(nonatomic, retain) VmixCollection *collection;
@property(nonatomic, retain) VideoCell *videoCell;
@property (nonatomic, retain) NSMutableData  *authData;
@property (nonatomic, retain) UIPopoverController * collectionsPopOver;
@property (nonatomic, retain) CollectionsPopOver * collectionsPopOverView;
@property (nonatomic, retain) UIButton *collectionsButton;
@property (nonatomic, retain) NSMutableDictionary *imageCache;
@property (nonatomic, retain) UIBarButtonItem *rightArrowButton;
@property (nonatomic, retain) UIBarButtonItem *leftArrowButton;
@property (nonatomic, retain) VmixGridViewController * gridViewController;
@property Boolean appLaunched;
@property Boolean viewContainsNoContent;

- (void) idFinishParsingCollectionMedias:(NSMutableArray *) mediaArray;
- (void) didFinishParsingCollections:(NSMutableArray *) collectionsArray;
- (void) updateTableWithCollection:(VmixCollection *) theCollection;
- (void) collapseView;
- (void) insertNewObject:(id)sender;

@end
